home *** CD-ROM | disk | FTP | other *** search
/ C!T ROM 3 / ct-rom iiib.zip / ct-rom iiib / WINDOWS / DIVERSEN / WINE02BX / TIMER.ELC < prev    next >
Text File  |  1993-03-28  |  12KB  |  131 lines

  1. ;;; compiled by @win386 on Sat Mar 13 01:40:40 1993
  2. ;;; from file c:/src/lucid-19.4/lisp/prim/timer.el
  3. ;;; emacs version 19.3 Lucid.
  4. ;;; bytecomp version 2.08; 27-aug-92.
  5. ;;; optimization is on.
  6. ;;; this file uses opcodes which do not exist in Emacs18.
  7.  
  8. (if (and (boundp 'emacs-version)
  9.      (or (and (boundp 'epoch::version) epoch::version)
  10.          (string-lessp emacs-version "19")))
  11.     (error "This file was compiled for Emacs19."))
  12.  
  13. (defvar timer-list nil "\
  14. List of all active timers.")
  15. (defvar timer-edit-map nil "\
  16. Keymap used when in Timer Edit mode.")
  17. (byte-code "¼┐┴ ┬├─#ê┬┼╞#ê┬╟╚#ê┬╔╩#ê┬╦╠#ê┬═╠#ê┬╬╧#ê┬╨╤#ê┬╥╙#ê┬╘╒#ê╓╫!¼â╪┘┌Mê█▄Mê▌▐Mç" [timer-edit-map make-sparse-keymap define-key "s" timer-edit-set-field "d" timer-edit-delete-timer "q" timer-edit-quit "    " timer-edit-next-field " " next-line "n" "p" previous-line "" timer-edit-previous-field "x" start-timer "?" timer-edit-help boundp timer-edit-start-marker nil decrement (macro . #[(variable) "└    ┬    DEç" [setq variable 1-] 4]) increment (macro . #[(variable) "└    ┬    DEç" [setq variable 1+] 4]) signum (macro . #[(n) "└┴\n├E─└┼\nD├╞FFç" [if > n 0 1 zerop -1] 7])] 4)
  18. (fset 'check-timer '(macro . #[(var) "└    ┬├    D    ─┼╞╟    EEFEç" [setq var if timerp signal 'wrong-type-argument list 'timerp] 10 "\
  19. If VAR is not bound to a timer, signal wrong-type-argument.
  20. This is a macro."]))
  21. (fset 'check-timer-coerce-string '(macro . #[(var) "└    ┬├    D    D─    D┼    DD╞╟╚╔╩    EEDFEç" [setq var cond timerp stringp get-timer t signal 'wrong-type-argument list 'string-or-timer-p] 11 "\
  22. If VAR is not bound to a string, look up the timer that it names and
  23. bind VAR to it.  Otherwise if VAR is not bound to a timer, signal
  24. wrong-type-argument.  This is a macro."]))
  25. (fset 'check-natnumber '(macro . #[(var) "└    ┬├    D    ─┼╞╟    EEFEç" [setq var if natnump signal 'wrong-type-argument list 'natnump] 10 "\
  26. If VAR is not bound to a non-negative number, signal wrong-type-argument.
  27. This is a macro."]))
  28. (fset 'check-string '(macro . #[(var) "└    ┬├    D    ─┼╞╟    EEFEç" [setq var if stringp signal 'wrong-type-argument list 'stringp] 10 "\
  29. If VAR is not bound to a string, signal wrong-type-argument.
  30. This is a macro."]))
  31. (fset 'timerp #[(obj) ":¡ë@;¡äG┴=ç" [obj 5] 2 "\
  32. Returns non-nil iff OBJ is a timer."])
  33. (fset 'timer-name #[(timer) "└    !½â    ¬å┬├└    D\"ë@ç" [timerp timer signal wrong-type-argument] 5 "\
  34. Returns the name of TIMER."])
  35. (fset 'timer-value #[(timer) "└    !½â    ¬å┬├└    D\"ëA@ç" [timerp timer signal wrong-type-argument] 5 "\
  36. Returns the number of seconds until TIMER expires."])
  37. (fset 'timer-restart #[(timer) "└    !½â    ¬å┬├└    D\"─    8ç" [timerp timer signal wrong-type-argument 2] 4 "\
  38. Returns the value to which TIMER will be set at restart.
  39. nil is returned if this timer doesn't restart."])
  40. (fset 'timer-function #[(timer) "└    !½â    ¬å┬├└    D\"─    8ç" [timerp timer signal wrong-type-argument 3] 4 "\
  41. Returns the function of TIMER.
  42. This function is called each time TIMER expires."])
  43. (fset 'timer-id #[(timer) "└    !½â    ¬å┬├└    D\"─    8ç" [timerp timer signal wrong-type-argument 4] 4 "\
  44. Returns the timeout-id of TIMER."])
  45. (fset 'set-timer-value #[(timer value) "└    !½â    ¬å┬├└    D\"─!½â¬å┬├─D\"╞╚    !½ä╔    !ê    Aáê╩    !ê)ç" [timerp timer signal wrong-type-argument natnump value t inhibit-quit timer-id deactivate-timer activate-timer] 4 "\
  46. Set the timeout value of TIMER to be VALUE.
  47. Timer will expire is this many seconds.
  48. Returns VALUE."])
  49. (fset 'set-timer-restart #[(timer restart) "└    !½â    ¬å┬├└    D\" ½Å┼ !½â ¬å┬├┼ D\" ½ï ╞W½å┬╟ C\"ê╚    !╔\në ½ä╠    !ê    AA áê ½î    A áê ½ä═    !ê* ç" [timerp timer signal wrong-type-argument restart natnump 1 args-out-of-range timer-id t inhibit-quit was-active deactivate-timer activate-timer] 5 "\
  50. Set the restart value of TIMER to be RESTART.
  51. If RESTART is nil, TIMER is will not restart when it expires.
  52. Returns RESTART."])
  53. (fset 'set-timer-function #[(timer function) "└    !½â    ¬å┬├└    D\"ëAAA áç" [timerp timer signal wrong-type-argument function] 5 "\
  54. Set the function of TIMER to be FUNCTION.
  55. FUNCTION will be called when timer expires.
  56. Returns FUNCTION."])
  57. (fset 'set-timer-id #[(timer id) "└    !½â    ¬å┬├└    D\"ëAAAA áç" [timerp timer signal wrong-type-argument id] 5])
  58. (fset 'get-timer #[(name) ";½â¬å┴┬├D\"─\"ç" [name signal wrong-type-argument stringp assoc timer-list] 4 "\
  59. Return timer named NAME, or nil if there is none."])
  60. (fset 'read-timer #[(prompt &optional initial-input) "└┴\n ─┼%!ç" [get-timer completing-read prompt timer-list nil confirm initial-input] 7 "\
  61. Read the name of a timer from the minibuffer and return the timer
  62. associated with that name.  The user is prompted with PROMPT.
  63. Optional second arg INITIAL-INPUT non-nil is inserted into the
  64.   minibuffer as initial user input."])
  65. (fset 'delete-timer #[(timer) "└    !½â    ¬Å    ;½à┬    !¬å├─┼    D\"╞    !ê╟    \"ëç" [timerp timer get-timer signal wrong-type-argument string-or-timer-p deactivate-timer delq timer-list] 4 "\
  66. Deletes TIMER.  TIMER may be a timer or the name of one."])
  67. (fset 'start-timer #[(name function value &optional restart) ";½â¬å┴┬├D\"─!½â¬å┴┬─D\"½ô─!½ä¬ç┴┬─D\"╟    ╩!½Å    ╦╠RT¬l*═╨»B)╥@!ê@ç" [name signal wrong-type-argument stringp natnump value restart 2 num oname get-timer "<" ">" t inhibit-quit function nil timer-list activate-timer] 5 "\
  68. Start a timer.
  69. Args are NAME, FUNCTION, VALUE &optional RESTART.
  70. NAME is an identifier for the timer.  It must be a string.  If a timer
  71.   already exists with this name, NAME will be modified slightly to until
  72.   it is unique.
  73. FUNCTION should be a function (or symbol naming one) of no arguments.  It
  74.   will be called each time the timer expires.  The function can access
  75.   timer that invoked it through the variable `current-timer'.
  76. VALUE is the number of seconds until this timer expires.
  77. Optional fourth arg RESTART non-nil means that this timer should be
  78.   restarted automatically after its function is called.  Normally a timer
  79.   is deleted at expiration after its function has returned. 
  80.   If non-nil RESTART should be a number indicating the value at which the
  81.   timer should be set at restart time.
  82. Returns the newly created timer." (byte-code "└┴\n\"├└─╞#!╟╔!¼è╩╦╟ë╠$¬p)╠╔!¼ï╩╬╟ë╠$ë¼o)Fç" [completing-read "Start timer: " timer-list read "Timer function: " obarray fboundp nil value natnump read-from-minibuffer "Timer value: " t restart "Timer restart: "] 9)])
  83. (fset 'list-timers #[nil "└┴!`\n┼!\nqê╚ ê╔\n╦ ê╠═▒ê¼â`½╡╧╨!ê╤╥@!!ê╙ ê╤╘@!!ê╙ ê╤╒@!!ê╙ ê╤╓@!!êAë¼K bê`W½äbê╫\n╪\n!,ç" [get-buffer-create "*Timer List*" buf opoint standard-output reverse timer-list timers timer-edit-mode nil buffer-read-only erase-buffer "Name                  Value     Restart   Function\n" "----                  -----     -------   --------" timer-edit-start-marker newline 1 prin1 timer-name tab-to-tab-stop timer-value timer-restart timer-function t display-buffer] 4 "\
  84. Pop up a buffer containing a list of all timers.
  85. The major mode of the buffer is Timer Edit mode.  This major mode provides
  86. commands to manipulate timers; see the documentation for
  87. `timer-edit-mode' for more information." nil])
  88. (fset 'edit-timers #[nil "└ ê┴┬├!!ê bê½ç╞╟!ê╚ ê╔╩!ç" [list-timers select-window get-buffer-window "*Timer List*" timer-edit-start-marker timer-list forward-sexp 2 backward-sexp message "type q to quit, ? for help"] 3 "\
  89. Display a list of all timers and select it for editing.
  90. The major mode of the buffer containing the listing is Timer Edit mode.
  91. This major mode provides commands to manipulate timers; see the documentation
  92. for `timer-edit-mode' for more information." nil])
  93. (fset 'timer-edit-mode #[nil "└ ê┴┬!ê├┼╟╔╩╦!ê╠╦!ê═p!ê╬!ê¡ä╤!ç" [kill-all-local-variables make-local-variable tab-stop-list timer-edit-mode major-mode "Timer Edit" mode-name t truncate-lines (22 32 42) abbrev-mode 0 auto-fill-mode buffer-disable-undo use-local-map timer-edit-map lisp-mode-syntax-table set-syntax-table] 2 "\
  94. Major mode for manipulating timers.
  95. Atrributes of running timers are changed by moving the cursor to the
  96. desired field and typing `s' to set that field.  The field will then be
  97. set to the value read from the minibuffer.
  98.  
  99. Commands:
  100. TAB    move forward a field
  101. DEL    move backward a field
  102. s      set a field
  103. d      delete the selected timer
  104. x      start a new timer
  105. ?      help"])
  106. (put 'timer-edit-mode 'mode-class 'special)
  107. (fset 'timer-edit-help #[nil "┴=½â┬ ç├─!ç" [last-command timer-edit-help describe-mode message "TAB, DEL select fields, (s)et field, (d)elete timer   (type ? for more help)"] 2 "\
  108. Help function for Timer Edit." nil])
  109. (fset 'timer-edit-quit #[nil "└p!ê┴┬!½å├─p!!ç┼ ç" [bury-buffer one-window-p t switch-to-buffer other-buffer delete-window] 3 "\
  110. End Timer Edit." nil])
  111. (byte-code "└┴Mê┬├Mê─┼Mê╞╟Mê╚╔Mê╩╦Mê╠═Mê╬╧Mê╨╤Mê╥╙Mê╘╒Mê╓╫Mç" [timer-edit-set-field #[nil "`X½ä┴┬!ê├ë┬è╟yê╚╔p!!)è╩ ê`╟  ╟yê `Y½ö ═W½Ä╬╧!ê╨ ê T ¬f ╤=½à┴╥!¬Ö ╧=½â╙¬É ╘=½â╒¬ç ═=¡ü╓+ë╙=½ò╫┘ !¼è┌├ë█$¬q)¬╚╒=½Ö▄ ½É┘ !¼ï┌├ë█$ë¼p)¬¬╓=½Ñ▌ 9½à▐ !¼ÿ :½å @▀>¼Ä╔α!▐├$!ë¬`)ΓπΣ!P! \"ê╩ ê├ë%&τ╤!êΦ`Θ├wê`\"êΩ p\"êl¼âδ ê╨ -ç" [timer-edit-start-marker error "" nil field-value field timer 0 get-timer read timer-edit-beginning-of-field n opoint 4 forward-sexp 2 backward-sexp 1 "Cannot change timer name." value 3 restart function "Set timer value: " prompt natnump read-from-minibuffer t "Set timer restart: " "Set timer function: " fboundp (lambda macro) completing-read obarray intern "set-timer-" symbol-name kill-ring buffer-read-only kill-sexp kill-region "     " prin1 tab-to-tab-stop] 7 nil nil] timer-edit-delete-timer #[nil "`X½ä┴┬!ê├─┼è╞yê╟p!)\"!ê╚ ç" [timer-edit-start-marker error "" delete-timer read-timer "Delete timer: " 0 read list-timers] 5 nil nil] timer-edit-next-field #[(count) "└ ê    ┬V½â├¬ë    ┬U½â┬¬ü─┬V½⌐    ┬U?¡┘┼ êm½çbê┼ ê┼ ê╟ ên½ç┼╚!ê╟ ê    Së¬X    ┬V½â├¬ë    ┬U½â┬¬ü─┬W¡í    ┬U?¡¢╟ ên½â╟ ê`X½ådbê╟ ê    Të¬`ç" [timer-edit-beginning-of-field count 0 1 -1 forward-sexp timer-edit-start-marker backward-sexp 2] 3 nil "p"] timer-edit-previous-field #[(count) "└    [!ç" [timer-edit-next-field count] 2 nil "p"] timer-edit-beginning-of-field #[nil "è└ ê┴ ê`)è┴ ê`)ë\n=½ä┴ ¬è `=½â─¬é┴ *ç" [forward-sexp backward-sexp back forw-back t] 3] timer-process-filter #[(process string) "└┴!ç" [error "timer-process-filter is for v18 only"] 2] timer-process-sentinel #[(process message) "└┴!ç" [error "timer-process-sentinel is for v18 only"] 2] timer-process-start #[nil "└┴!ç" [error "timer-process-start is for v18 only"] 2] timer-process-wakeup #[nil "└┴!ç" [error "timer-process-wakeup is for v18 only"] 2] activate-timer #[(timer) "└┬ ─┼ !╞ ╟ !$\"ê) ç" [t inhibit-quit set-timer-id timer add-timeout timer-value timer-callback timer-restart] 8] deactivate-timer #[(timer) "└┴\n! ½ä┼ !ê╞\n╟\"ê*\nç" [t timer-id timer id inhibit-quit disable-timeout set-timer-id nil] 3] timer-callback #[(current-timer) "└    ! ç" [timer-function current-timer] 2]] 2)
  112. (defvar auto-save-timeout 30 "\
  113. *Number of seconds idle time before auto-save.
  114. Zero or nil means disable auto-saving due to idleness.
  115.  
  116. The actual amount of idle time between auto-saves is logarithmically related
  117. to the size of the current buffer.  This variable is the number of seconds
  118. after which an auto-save will happen when the current buffer is 50k or less;
  119. the timeout will be 2 1/4 times this in a 200k buffer, 3 3/4 times this in a
  120. 1000k buffer, and 4 1/2 times this in a 2000k buffer.
  121.  
  122. For this variable to have any effect, you must do (require 'timer).
  123.  
  124. See also the variable `auto-save-interval', which controls auto-saving based
  125. on the number of characters typed.")
  126. (fset 'auto-save-timer #[nil "½Σ┴X¼▀┬ ├ =¼╪─┼ ╞\"T┴╟ ╚    \n ë ═V½Æ T  ─ ╬\"Zë ¬j ╧W½â╧  _╧Ñ    :½ò\n@@U½î\nAAZ    V½â╤ ê,╥╙!ë¼ä╒╓!ê½ù╧V½Æ╫!╧ÑU¼ê╪╧Ñ\"ê)╚ç" [auto-save-timeout 0 minibuffer-window selected-window ash buffer-size -8 current-time-seconds nil delay now delay-level buf-size 64 -2 4 last-input-time do-auto-save get-timer "auto-save" self error "auto-save-timer can't find itself" timer-restart set-timer-restart] 5 "\
  127. For use as a timer callback function.
  128. Auto-saves based on the size of the current buffer and the value of
  129. auto-save-timeout and the current keyboard idle-time."])
  130. (byte-code "½å┴┬!ꬣ ¼Ö─┼!¼ö╞«ü╚╔Ñ]\n╦┼╠\në$ê)═╬!ç" [purify-flag message "WARNING: if timer.el is preloaded, auto-save-timeout won't work." noninteractive get-timer "auto-save" 2 auto-save-timeout 30 4 time start-timer auto-save-timer provide timer] 5)
  131.